<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>编辑页面</title>
    <%@ include file="../../../common/meta.jsp" %>
    <%@ include file="../../../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/common-body.css?t=${now}" rel="stylesheet">
    <script src="${ctx}/js/common/common-body.js?t=${now}"></script>
    <script src="${ctx}/js/common/obj_compare.js"></script>
    <script src="${ctx}/js/plugins/jquery.ajaxfileupload-2.1.js?t=${now}"></script>
    <script src="${ctx}/js/imageview/jquery.photo.gallery.js?t=${now}"></script>
</head>
<style>
    #_btnDiv{
        height: 34px;
        margin-bottom: 0px;
    }
</style>
<script>
    var defType = '${type}';
    var oneLogInfo = ${oneLogInfo};
    var defLogInfo = ${defLogInfo};
    var searchLogInfo = ${searchLogInfo};
    var oneAfterDocAppInfo = ${oneAfterDocAppInfo};
    var oneBeforeDocAppInfo = ${oneBeforeDocAppInfo};
</script>
<body class="gray-bg">
<div id="vue">
    <div class="myContent">
        <div class="tabs-container">
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="ibox float-e-margins myIbox">
                                <table class="_tabTable">
                                    <tr>
                                        <td class="active" onclick="showBizDocApp()" id="_bizDocAppTD">服务信息</td>
                                        <td onclick="showBizDocAppFunc()" id="_bizDocAppFuncTD">服务项信息</td>
                                    </tr>
                                </table>
                                <div class="ibox-content" id="_bizDocAppDiv">
                                    <c:if test="${type == 'query'}">
                                        <form class="form-horizontal m-t">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">审核结果：</label>
                                                <label class="col-sm-8 control-label control-label-content">${not empty oneLogInfo && oneLogInfo.result == 'pass'? '通过' : '不通过'}</label>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">审核说明：</label>
                                                <label class="col-sm-8 control-label control-label-content">${not empty oneLogInfo?oneLogInfo.remark : ''}</label>
                                            </div>
                                        </form>
                                    </c:if>
                                    <h5 class="page-header page-header-new"><i class="fa fa-file-text"></i>&nbsp;&nbsp;基本信息</h5>
                                    <form class="form-horizontal m-t">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ${not empty oneAfterDocAppInfo && oneAfterDocAppInfo.bizCode != oneBeforeDocAppInfo.bizCode && oneLogInfo.operateType == 'edit' ? 'hasChange' : ''}">业务类型：</label>
                                            <label class="col-sm-3 control-label control-label-content">${not empty oneLogInfo?oneLogInfo.bizName : ''}</label>
                                            <label class="col-sm-2 control-label ${not empty oneAfterDocAppInfo && oneAfterDocAppInfo.orgCode != oneBeforeDocAppInfo.orgCode && oneLogInfo.operateType == 'edit' ? 'hasChange' : ''}">关联机构：</label>
                                            <label class="col-sm-3 control-label control-label-content">${not empty oneLogInfo?oneLogInfo.orgName : ''}</label>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ${not empty oneAfterDocAppInfo && oneAfterDocAppInfo.refCode != oneBeforeDocAppInfo.refCode && oneLogInfo.operateType == 'edit' ? 'hasChange' : ''}">关联医生：</label>
                                            <label class="col-sm-3 control-label control-label-content">${not empty oneLogInfo?oneLogInfo.docName : ''}</label>
                                            <label class="col-sm-2 control-label ${not empty oneAfterDocAppInfo && oneAfterDocAppInfo.isvPid != oneBeforeDocAppInfo.isvPid && oneLogInfo.operateType == 'edit' ? 'hasChange' : ''}">服务商：</label>
                                            <label class="col-sm-3 control-label control-label-content">${not empty oneLogInfo?oneLogInfo.isvName : ''}</label>
                                        </div>
                                    </form>
                                </div>
                                <div class="ibox-content" id="_bizDocAppFuncDiv" style="display: none;">
                                    <c:if test="${type == 'query'}">
                                        <form class="form-horizontal m-t">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">审核结果：</label>
                                                <label class="col-sm-8 control-label control-label-content">${not empty oneLogInfo && oneLogInfo.result == 'pass'? '通过' : '不通过'}</label>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">审核说明：</label>
                                                <label class="col-sm-8 control-label control-label-content">${not empty oneLogInfo?oneLogInfo.remark : ''}</label>
                                            </div>
                                        </form>
                                    </c:if>
                                    <form class="form-horizontal m-t">
                                        <c:if test="${not empty docAppFuncList}">
                                            <c:forEach items="${docAppFuncList}" var="item">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldAppName != item.appName) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">服务项名称：</label>
                                                    <label class="col-sm-3 control-label control-label-content">${not empty item?item.appName : ''}</label>
                                                    <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldSortNum != item.sortNum) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">排序：</label>
                                                    <label class="col-sm-3 control-label control-label-content">${not empty item?item.sortNum : ''}</label>
                                                </div>
                                                <c:if test="${not empty item && item.isHavingMoney == 'Y'}">
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldValidDay != item.validDay) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">服务有效期：</label>
                                                        <label class="col-sm-1 control-label control-label-content">${not empty item ? item.validDay : ''}</label>
                                                        <label class="col-sm-2 control-label control-label-content">天</label>
                                                        <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldReplyTime != item.replyTime) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">已回答次数：</label>
                                                        <label class="col-sm-3 control-label control-label-content">${not empty item?item.replyTime : ''}</label>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldPremium != item.premium) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}"><span style="color: red;">*</span> 溢价：</label>
                                                        <label class="col-sm-1 control-label control-label-content">${not empty item?item.premium : ''}</label>
                                                        <label class="col-sm-2 control-label control-label-content">元</label>
                                                        <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldOriginalPrice != item.originalPrice) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">原价：</label>
                                                        <label class="col-sm-1 control-label control-label-content">${not empty item?item.originalPrice : ''}</label>
                                                        <label class="col-sm-2 control-label control-label-content">元</label>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldDiscountPrice != item.discountPrice) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">折扣价：</label>
                                                        <label class="col-sm-1 control-label control-label-content">${not empty item?item.discountPrice : ''}</label>
                                                        <label class="col-sm-2 control-label control-label-content">元</label>
                                                        <label class="col-sm-2 control-label ${(item.operateType == 'edit' && (item.oldDiscountStartTime != item.discountStartTime || item.oldDiscountEndTime != item.discountEndTime)) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">折扣日期：</label>
                                                        <label class="col-sm-5 control-label control-label-content">${not empty item?item.discountStartTime : ''}-${not empty item?item.discountEndTime : ''}</label>
                                                    </div>
                                                </c:if>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldAppLinkUrl != item.appLinkUrl) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">服务说明URL：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty item?item.appLinkUrl : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldServiceContent != item.serviceContent) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">服务说明：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty item?item.serviceContent : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label ${(item.operateType == 'edit' && item.oldRemark != item.remark) ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">备注：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty item?item.remark : ''}</label>
                                                </div>
                                            </c:forEach>
                                        </c:if>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="form-group" id="_btnDiv">
                    <div class="col-sm-4 col-sm-offset-5">
                        <c:if test="${type == 'check'}">
                            <c:if test="${qrCodeFlag == 1}">
                                <input type="button" class="btn btn-info" onclick="openViewPage()" value="扫码预览">
                            </c:if>
                            <c:if test="${qrCodeFlag == 2}">
                                <button class="btn btn-info" onclick="doPass()">通过</button>
                                <button class="btn btn-danger" onclick="$('#checkFailPage').modal('show');">不通过</button>
                            </c:if>
                        </c:if>
                        <input type="button" class="btn btn-white" onclick="doClose()" value="返回">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<div id="checkFailPage" class="modal" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 style="text-align: center; font-weight: normal;">审核不通过</h4>
            </div>
            <div class="modal-body modal-body-height">
                <form id="error" class="form-horizontal m-t">
                    <div class="form-group">
                        <label class="col-sm-12 control-label" style="text-align: left;"><span style="color: red">*</span>请输入审核不通过原因（必填）：</label>
                    </div>
                    <div class="form-group">
                        <textarea id="remark" name="remark"  required minlength="1" style="height: 120px; resize: none; width: 100%;" maxlength="1000"></textarea>
                    </div>
                </form>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button class="btn btn-info" onclick="doUnPass()">确定</button>
                <button class="btn btn-white" onclick="closeCheckFailPage();">取消</button>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/js/check/docOrg/win/detailDocAppMgr.js?time=${now}"></script>
</body>
</html>
